<?php $this->headLink()->appendStylesheet($this->baseUrl('css/adminpage.css'))?>
<?php $this->headLink()->appendStylesheet($this->baseUrl('css/admintable.css')); ?>
<?php echo $this->render('frontend_common/header.phtml'); ?>

<div id="Content">
<div style="margin-left: 100px">
<div id="flower_tool" style="margin: 30px; margin-left: 0">
	<a style="border: 1px solid red; background-color: white; border-radius:5px 5px 5px; padding:5px ;font-weight: bold;color: black;text-decoration: none " href="<?php echo $this->baseUrl('admin/addcategorynews') ?>">Thêm loại bài viết mới</a>
</div>
<table>
	<tr>
		<thead>
		<th>ID</th>
		<th>Tên loại</th>
		<th></th>
		</thead>
	</tr>
<?php $loaibaiviet_data=$this->categorynew;
	foreach ($loaibaiviet_data as $key=>$motloai)
	{
		?>
		<tr
		<?php
			if ($key % 2 != 0)
				echo ('class="changecolor1" style="background-color:#f3f3f3;"');
			else
				echo ('class="changecolor2" style="background-color:#FFF;"');
		?>
		>
			<td>
			<?php echo $motloai['id'] ?>
			</td>
			<td>
			<?php echo $motloai['tenloai'] ?>
			</td>
			<td class="command">
				<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'viewcategorynewdetail','loai_id'=>$motloai['id'])) ?>">
				<img title="Xem danh sách bài viết" class="tool_img" alt="Sửa thông tin" src="<?php echo $this->baseUrl("images/system/detail.png") ?>" />
				</a>
				<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'editcategorynew','loai_id'=>$motloai['id'])) ?>">
					<img title="Sửa thông tin" class="tool_img" src="<?php echo $this->baseUrl("images/system/changeicon.png") ?>" />
				</a>
				<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'deletecategorynew','loai_id'=>$motloai['id'])) ?>">
				<img title="Xóa" class="tool_img" src="<?php echo $this->baseUrl("images/system/deleteicon.jpg") ?>" />
				</a>
			</td>
		</tr>
		<?php 
	}
?>
</table>

<div id="flower_tool" style="margin: 30px; margin-left: 0">
	<a style="border: 1px solid red; background-color: white; border-radius:5px 5px 5px; padding:5px ;font-weight: bold;color: black;text-decoration: none " href="<?php echo $this->baseUrl('admin/index') ?>">Admin page</a>
</div>
<?php echo $this->render('frontend_common/footer.phtml'); ?>